<link href="../addons/jy_commission/custom/templates/mobile/style.css?v=201705251730" rel="stylesheet">
<style>
.fui-header a.back:before {
    border-color: #fff;
}
.fui-list a {
    color: #4491F1;
}
</style>
<div class="fui-page fui-page-current page-commission-down">
	 <div class="fui-header sysbgcolor">
        <div class="fui-header-left">
            <a class="back" style="color:#fff" ng-click="goback();"></a>
        </div>
        <div class="title" style="color:#fff">【{{pagedata.member.nickname || pagedata.member.username}}】{{pagedata.setting.tagent || '分销商'}}({{pagedata.allagentnum}}个)</div>
    </div>
	<div class="fui-content" ng-if="pagedata.params.islist!=1">
	<div class="fui-cell-group radius">
			<div ng-if="pagedata.params.istui!=1" class="fui-cell"style="height: 2.85rem;">
				<div class="fui-cell-text"><span class="bold">我的直推</span> | {{pagedata.mytuinum||0}}人</div>
				<div class="fui-cell-remark" style="font-size: 0.5rem;" href="javascript:;" ng-click="access_json('jy_commission/down//istui=1')">查看详情</div>
			</div>
			<div ng-repeat="item in pagedata.levels" class="fui-cell"style="height: 2.85rem;">
				<div class="fui-cell-text"><span class="bold">{{item.title}}</span> | {{item.num}}人</div>
				<div class="fui-cell-remark" style="font-size: 0.5rem;" href="javascript:;" ng-click="access_json('jy_commission/down//islist=1&level_id='+item.id+'&istui='+pagedata.params.istui)">查看详情</div>
			</div>
			
	</div>
	</div>
    <div class="fui-content" ng-if="pagedata.params.islist==1">
		<div ng-if="pagedata.pluginset.down_nolevel==1" class="fui-tab fui-tab-danger" id="tab">
			<a ng-click="pagedata.params.level=1;tool.get_list('jy_commission/down/list/',true)" ng-class="{'active':pagedata.params.level==1}" href="javascript:;">我的直推</a>
			<a ng-click="pagedata.params.level=2;tool.get_list('jy_commission/down/list/',true)" ng-class="{'active':pagedata.params.level==2}" href="javascript:;">我的间推</a>
			<a ng-click="pagedata.params.level=3;tool.get_list('jy_commission/down/list/',true)" ng-class="{'active':pagedata.params.level==3}" href="javascript:;">全部队员</a>
		</div>
		<div style="padding:0.5rem;margin-top:-0.5rem">
        <div class="fui-list-group radius" id="container" >
		<div ng-repeat="item in pagedata.list track by item.mid" class="fui-list" style="height: 3.5rem">
			<div class="fui-list-media">
				<img ng-src="{{tomedia(item.member.avatar) ||'../core/resource/images/nopic.jpg'}}" class="round" style="width:2rem;height:2rem">
			</div>
			<div class="fui-list-inner">
				<div class="row">
				      <div class="row-text" >
					  <i ng-if="item.is_agent" class="icon icon-star text-danger"></i>
					 {{item.member.nickname}}
				      </div>
				</div>
				<div class="subtitle">
				    {{item.leveltitle}}<a ng-if="pagedata.pluginset.no_showmobile!=1" class="syscolor" href="tel:{{item.member.mobile}}">({{item.member.mobile||'无手机'}})</a>
				</div>
				<div ng-if="item.is_agent ==1" class="subtitle">
				    成为{{pagedata.setting.tagent || '分销商'}}时间: {{item.agenttime}}
				</div>
				<div ng-if="item.is_agent !=1" class="subtitle">
				    注册时间:{{item.createtime}}
				</div>
			</div>
			<div ng-if="item.is_agent" class="row-remark" style="min-width:3rem">
				<p ng-click="access_json('/down//ismid='+item.mid);">{{item.member_num}}个成员</p>
			</div>
			<div ng-if="!item.is_agent" class="row-remark" style="min-width:3rem">
				<p>消费: {{item.moneycount}}元</p>
				<p>{{item.ordercount}}个订单</p>

			</div>
		</div>
		</div>
		<div class='infinite-loading' style="display:none" id="loading_show"><span class='fui-preloader'></span><span class='text'> 正在加载...</span></div>
		<div ng-if="pagedata.list.length==0" class='content-empty' >
			<i class="icon jinyunicon icon-cry" style="width: 6rem;margin-bottom: 0.5rem;"></i>
			<br/>
			<p style="color: #999;font-size: .75rem">暂时没有任何数据</p>
		</div>
		</div>
    </div>
</div>
<div ng-include="sys_html('_footer')"></div>
<script>
if(scope.pagedata.params.islist==1){
	scope.pagedata.get_list=function(){
		scope.tool.get_list('jy_commission/down/list/',true);
	}
	scope.tool.get_list('jy_commission/down/list/',true);
	scope.pagedata.scroll_bottom=function(){
		scope.tool.get_list('jy_commission/down/list/');
	}
}
</script>

